linear_regression <- function(y) {
x <- 1:length(y) / 60
relation <- lm(y ~ x)
plot(x, y, col = "darkred", abline(relation), xlab = "hours", ylab = "USD")
}
sapply(prices, linear_regression)## $`tmp/BCH.json`
## NULL
##
## $`tmp/BCHABC.json`
## NULL
##
## $`tmp/BTC.json`
## NULL
##
## $`tmp/EOS.json`
## NULL
##
## $`tmp/ETC.json`
## NULL
##
## $`tmp/ETH.json`
## NULL
##
## $`tmp/LTC.json`
## NULL
##
## $`tmp/REP.json`
## NULL
##
## $`tmp/XLM.json`
## NULL
##
## $`tmp/XRP.json`
## NULL
##
## $`tmp/ZRX.json`
## NULL